/* --------------------------- editor_basic.js ------------------------------ */
// Documented at editor.js.
VED.editor = VED.event.extend({
   initialize: function() {
      // Push this editor to the pending list. It'll be processed later once
      // the full editor code is loaded.
      VED._.pending.push( [ this, arguments ] );

      this.parent();
   },

   // Both fire and fireOnce will always pass this editor instance as the
   // "editor" param in VED.event.fire. So, we override it to do that
   // automaticaly.
   fire: function( eventName, data ) {
      if ( eventName in { instanceReady:1,loaded:1 } )
         this[ eventName ] = true;

      return this.parent.call( this, eventName, data, this );
   },

   fireOnce: function( eventName, data ) {
      if ( eventName in { instanceReady:1,loaded:1 } )
         this[ eventName ] = true;

      return this.parent.call( this, eventName, data, this );
   }

});






